package com.fhz.mvvmtest.food2.viewmodel;

import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;

import com.fhz.mvvmtest.food.model.FoodModel;
import com.fhz.mvvmtest.food.repository.FoodRepository;
import com.fhz.mvvmtest.food.viewmodel.FoodViewModel;
import com.fhz.mvvmtest.food2.model.FoodModel2;
import com.fhz.mvvmtest.food2.repository.FoodRepository2;

/**
 * 时间:11/15/21
 *
 * @author msfeng
 * 简述: TODO
 */
public class FoodViewModelFactory2 implements ViewModelProvider.Factory {
    @NonNull
    @Override
    public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
        return (T) new FoodViewModel2(new FoodRepository2(new FoodModel2()));
    }
}
